#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2008 ZHENG Zhong <heavyzheng nospam-at gmail D0T com>
# - http://heavyz.blogspot.com/
# - http://buggarden.blogspot.com/
#
# AFCP webapp URL mappings.
#
# Created on 2008-10-28.
# $Id: urls.py 300 2008-12-15 14:56:43Z heavyzheng $
#

from django.conf.urls.defaults import patterns

urlpatterns = patterns( "buggarden.apps.afcp.views",

    ( r"^$"                                   , "home"               ),
    ( r"^lang/$"                              , "change_language"    ),
    ( r"^login_ok/(?P<url>.*)$"               , "login_ok"           ),
    ( r"^logout_ok/(?P<url>.*)$"              , "logout_ok"          ),
    ( r"^static/(?P<name>\w+)/$"              , "static_page"        ),
    ( r"^static/(?P<name>\w+)/(?P<lang>.+)/$" , "static_page"        ),
    ( r"^error/$"                             , "error_page"         ),
    ( r"^announcements/$"                     , "announcements"      ),
    ( r"^announcement/(?P<id>\d+)/$"          , "announcement"       ),
    ( r"^post_announcement/$"                 , "post_announcement"  ),
    ( r"^members/$"                           , "members"            ),
    ( r"^profile/(?P<uid>\w+)/$"              , "profile"            ),
    ( r"^profile/(?P<uid>\w+)/photo/$"        , "profile_photo"      ),
    ( r"^my_profile/$"                        , "my_profile"         ),
    ( r"^random_profile/$"                    , "random_profile"     ),
    ( r"^ecole/(?P<acronym>\w+)/$"            , "ecole"              ),
    ( r"^university/(?P<acronym>\w+)/$"       , "university"         ),
    ( r"^planet/$"                            , "planet_afcp"        ),
    
    ( r"^admin/$"                             , "admin"              ),
    
    # TODO:
    # ( r"^cv/(?P<uid>\w+)/$"                   , "cv"                 ), # TODO: remove me!
    # ( r"^cv/(?P<uid>\w+)/(?P<lang>\w+)/$"     , "cv"                 ),
    # ( r"^ecole/(?P<acronym>\w+)/$"            , "ecole"              ),
    # ( r"^promo/(?P<promo>\d+)/$"              , "promo"              ),
    
    # 404 not-found: must be the last URL pattern.
    ( r"^.*$"                                 , "not_found"          ),
)

